#ifndef kinova_driver_qt_MAIN_WINDOW_H
#define kinova_driver_qt_MAIN_WINDOW_H

#include <QtGui/QMainWindow>
#include "ui_main_window.h"
#include "qnode.hpp"

namespace kinova_driver_qt
{

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(int argc, char** argv, QWidget *parent = 0);
    ~MainWindow();

    void closeEvent(QCloseEvent *event);
    void showNoMasterMessage();

public Q_SLOTS:

    void on_actionAbout_triggered();
    void on_kinovaStatus_updated(Status kinovaStatus);
    void on_statusAutoRead_changed(bool);
    void on_reachPosBtn_clicked();
    void add_trajectory();
    void on_reachAngularPosBtn_clicked();
    void on_setFingersBtn_clicked();
    void on_getStatusBtn_clicked();
    void enableGui(bool enable);

    void updateLoggingView();

private:
    Ui::MainWindowDesign ui;

    QNode qnode;
    QMap<QString,Cartesian> savedTrajectories;

    bool statusAutoRead;
};

}
#endif
